package com.crm.system.service.returnMoney;

import com.crm.common.model.DataResponse;
import com.crm.common.model.DhPageInfo;
import com.crm.model.entity.orderManager.CustomerProductOrder;
import com.crm.model.entity.returnMoney.ReturnMoneyExamine;
import com.crm.model.qo.returnMoney.ReturnMoneyExamineQO;
import com.crm.model.vo.returnMoney.ReturnMoneyExamineVO;
import com.crm.model.vo.returnMoney.ReturnMoneyVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * 回款审核
 * @Author xielinqi
 * @Date 4:16 下午 2021/12/2
 */
public interface ReturnMoneyExamineService {

    /**
     * 回款审核分页查询
     * @Param pageIndex
     * @Param pageSize
     * @Param returnMoneyExamineQO
     * @Author xielinqi
     * @Date 4:29 下午 2021/12/2
     */
    DhPageInfo<ReturnMoneyExamineVO> selectPageList(Integer pageIndex, Integer pageSize, ReturnMoneyExamineQO returnMoneyExamineQO);

    /**
     * 审核
     * @Param returnMoneyExamine
     * @Author xielinqi
     * @Date 2:44 下午 2021/12/3
     */
    DataResponse examine(ReturnMoneyExamine returnMoneyExamine);

    /**
     * 最终审核
     * @Param returnMoneyExamine
     * @Param oldExamine
     * @Author xielinqi
     * @Date 10:07 上午 2021/12/6
     */
    DataResponse finalExamine(ReturnMoneyExamine returnMoneyExamine, ReturnMoneyExamine oldExamine);

    /**
     * 上传材料
     * @Param examineId
     * @Param file
     * @Author xielinqi
     * @Date 2:49 下午 2021/12/6
     */
    DataResponse uploadMaterial(String examineId, MultipartFile file);

    /**
     * 获取审核详情
     * @Param examineId
     * @Author xielinqi
     * @Date 9:52 上午 2021/12/10
     */
    Map getDetails(String examineId);

    /**
     * 给业务人员发送站内信
     * @Param examineId 审核id
     * @Param examineState 审核状态，0：客服正在审核，1：财务正在审核
     * @Param newsDetailType 站内信内容类型，1：审核通过，2：审核未通过，3：补充材料
     * @Param customerProductOrder 订单信息
     * @Param returnMoney 回款信息
     * @Author xielinqi
     * @Date 11:13 上午 2021/12/13
     */
    Boolean sendMsg(String examineId, Short examineState, Short newsDetailType, CustomerProductOrder customerProductOrder, ReturnMoneyVO returnMoney);
}
